﻿using System.Collections.Generic;

namespace DimOS.H
{
    public class FunctionEntry
    {
        public string Name { get; set; }

        public Function Function { get; set; }

        public FunctionEntry(string name, Function function)
        {
            Name = name;
            Function = function;
        }

        public FunctionEntry Clone() { return new FunctionEntry(Name, Function); }

        public static FunctionEntry Find(List<FunctionEntry> source, string name)
        {
            for (int i = 0; i < source.Count; i++)
                if (source[i].Name == name) return source[i];
            return null;
        }
    }
}
